package com.sihai.ehr.model.biz;

import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;

import com.sihai.core.BaseEntity;
import com.sihai.ehr.model.sys.DispersionPatternEnum;
import com.sihai.ehr.model.sys.ExaminePeriodEnum;
import com.sihai.ehr.model.sys.Organization;

/**
 * 强制性分布设置实体类
 * <p>表现形式如下：</p>
 * <pre>
 * 	百分比，自定义人数,无强制性
 * </pre>
 * @author Henry
 * 
 */
@Entity
public class ExamQualDistSet extends BaseEntity<Long> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2394751679081595230L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long id;

	/** 组织结构ID */
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "organization_id")
	private Organization organization;

	/** 分布类型 */
	@Enumerated(EnumType.STRING)
	private DispersionPatternEnum type;
	
	/** 周期类型 */
	@Enumerated(EnumType.STRING)
	private ExaminePeriodEnum periodType;

	/** 是否删除 */
	private boolean cancel;

	@Override
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Organization getOrganization() {
		return organization;
	}

	public void setOrganization(Organization organization) {
		this.organization = organization;
	}

	public DispersionPatternEnum getType() {
		return type;
	}

	public void setType(DispersionPatternEnum type) {
		this.type = type;
	}

	
	public ExaminePeriodEnum getPeriodType() {
		return periodType;
	}
	
	public void setPeriodType(ExaminePeriodEnum periodType) {
		this.periodType = periodType;
	}
	
	public boolean isCancel() {
		return cancel;
	}

	public void setCancel(boolean cancel) {
		this.cancel = cancel;
	}
}
